home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / samba.idb / usr / samba / inetd.sh.z / inetd.sh
Encoding:
Linux/UNIX/POSIX Shell Script  |  1998-10-28  |  815 b   |  30 lines

  1. #! /bin/sh
  2. #
  3. # kill any running samba processes
  4. #
  5. /etc/killall smbd nmbd
  6. chkconfig samba off
  7.  
  8. #
  9. # add SAMBA deamons to inetd.conf
  10. #
  11. cp /etc/inetd.conf /etc/inetd.O
  12. sed -e "/^netbios/D" -e "/^#SAMBA/D" /etc/inetd.O > /etc/inetd.conf
  13. echo '#SAMBA services' >> /etc/inetd.conf
  14. echo netbios-ssn stream tcp  nowait  root    /usr/samba/bin/smbd smbd  >> /etc/inetd.conf
  15. echo netbios-ns  dgram udp   wait    root    /usr/samba/bin/nmbd nmbd -S >> /etc/inetd.conf
  16.  
  17. #
  18. # add SAMBA service ports to /etc/services
  19. #
  20. cp /etc/services /etc/services.O
  21. sed -e "/^netbios/D" -e "/^#SAMBA/D" /etc/services.O > /etc/services
  22. echo '#SAMBA services' >> /etc/services
  23. echo 'netbios-ns    137/udp                # SAMBA' >> /etc/services
  24. echo 'netbios-ssn    139/tcp                # SAMBA' >> /etc/services
  25.  
  26. #
  27. # restart inetd to start SAMBA
  28. #
  29. /etc/killall -HUP inetd
  30.